﻿using System;
using System.Configuration;
using System.Web;

namespace RaceList.activity.util
{
    /// <summary>
    ///     存储微信账号信息
    /// </summary>
    public class ActivityConfig
    {
        static ActivityConfig()
        {
            if (MHalloweenMaxScore == 0.0)
                MHalloweenMaxScore = double.MaxValue;
        }

        public static double MHalloweenMaxScore = Convert.ToDouble(ConfigurationManager.AppSettings["MHalloweenMaxScore"]);
        public static string MHalloweenAppId = ConfigurationManager.AppSettings["MHalloweenAppId"];
        public static string MHalloweenAppSecrect = ConfigurationManager.AppSettings["MHalloweenAppSecrect"];
        public static int MHalloweenTotalPerson = Convert.ToInt32(ConfigurationManager.AppSettings["MHalloweenTotalPerson"]);


        public static bool IsTest
        {
            get
            {
                string isTest = ConfigurationManager.AppSettings["IsTest"];
                if (isTest != null && isTest == "true")
                    return true;
                return false;
            }
        }

        public string AppId { get; set; }
        public string AppSecrect { get; set; }
        public int TotalPerson { get; set; }
        public double MaxScore { get; set; }



        public static ActivityConfig MHalloweenConfig
        {
            get
            {
                return new ActivityConfig
                {
                    AppId = MHalloweenAppId,
                    AppSecrect = MHalloweenAppSecrect,
                    TotalPerson = MHalloweenTotalPerson
                };
            }
        }
        public static ActivityConfig GetActivityConfig()
        {
            return MHalloweenConfig;
        }
    }
}